package com.sunwayworld.basemodule.samplemanage.location.resource;

import com.sunwayworld.basemodule.samplemanage.location.bean.LimsLocationBoardHoleBean;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import com.sunwayworld.basemodule.samplemanage.location.bean.LimsLocationBoardBean;
import com.sunwayworld.basemodule.samplemanage.location.service.LimsLocationBoardService;
import com.sunwayworld.framework.support.base.resource.GenericResource;
import com.sunwayworld.framework.support.choosable.resource.GenericChoosableResource;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@RequestMapping("/secure/baseline/samplemanage/location-boards")
public interface LimsLocationBoardResource extends GenericResource<LimsLocationBoardService, LimsLocationBoardBean, Long>, GenericChoosableResource<LimsLocationBoardService, LimsLocationBoardBean, Long> {

    @Log(value = "批量更新样本位置信息", type = LogType.UPDATE)
    @RequestMapping(value = "/update-samples-batch", method = RequestMethod.POST)
    String updateSampleLocations(RestJsonWrapperBean wrapper);

    @Log(value = "更新单个样本孔位信息", type = LogType.UPDATE)
    @RequestMapping(value = "/update-samples-single", method = RequestMethod.POST)
    void updateSampleBoardHole(RestJsonWrapperBean wrapper);

    @Log(value = "清空样本位置", type = LogType.UPDATE)
    @RequestMapping(value = "/clean-samples", method = RequestMethod.POST)
    void clearSampleHole(RestJsonWrapperBean wrapper);

    @Log(value = "查询板子",type = LogType.SELECT)
    @RequestMapping(value = "/queries/board",method = RequestMethod.POST)
    List<LimsLocationBoardBean> selectBoardList(@RequestBody LimsLocationBoardBean locationBoardBean);

    @Log(value = "查询板孔", type = LogType.SELECT)
    @RequestMapping(value = "/queries/holes",method = RequestMethod.POST)
    List<LimsLocationBoardHoleBean> selectSampleInfoList(@RequestBody LimsLocationBoardHoleBean locationBoardHoleBean);

    @Log(value = "可视化右击分配位置")
    @RequestMapping(value = "/ksh-assign-location",method = RequestMethod.POST)
    void kshAssignLocation(RestJsonWrapperBean wrapper);

    //迷你板接口
    @Log(value = "选中区域右击事件")
    @RequestMapping(value = "/right/click",method = RequestMethod.POST)
    void rightClickEvent(RestJsonWrapperBean wrapper);
}
